<?php

namespace Database\Seeders;

use App\Models\Admin;
use Illuminate\Database\Seeder;

class AdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Admin::factory(5)->create();
        $admin = Admin::find(1);
        $admin->username = 'admin';
        $admin->password = bcrypt('20257890');
        $admin->nickname = '管理员';
        $admin->save();
        $admin = Admin::find(2);
        $admin->username = 'test';
        $admin->password = bcrypt('20257890');
        $admin->nickname = '测试员';
        $admin->save();
    }
}
